package com.platform.server.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import com.platform.server.service.VipService;

@Controller
@RequestMapping("/vip")
public class VipController extends BaseController{
	
	@Autowired
	private VipService vipService;

	/**
	 * 查看自己的vip会员
	 */
	@ResponseBody
	@RequestMapping(value = "/selectVipPage",method = RequestMethod.POST)
	public Object selectVipPage(String id){
		return vipService.selectVipPage(id);
	}
	/**
	 * 查看vip协议
	 */
	@ResponseBody
	@RequestMapping(value = "/selectAgreement",method = RequestMethod.POST)
	public Object selectAgreement(){
		return vipService.selectAgreement();
	}
	/**
	 * 查看vip权益
	 */
	@ResponseBody
	@RequestMapping(value = "/selectEquity",method = RequestMethod.POST)
	public Object selectEquity(){
		return vipService.selectEquity();
	}
	/**
	 * 成为会员
	 */
	@ResponseBody    
	@RequestMapping(value="insertVip",method = RequestMethod.POST)  
    public Object insertVip(String id,String payMethod,String body,String subject,String payMoney,String password,String type) throws Exception{   	  
    	return vipService.insertVip(id, payMethod, body, subject, payMoney,request.getRemoteAddr(),password,type);
    }
	
}
